:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #292f36;
    --light-color: #f7fff7;
    --accent-color: #ffd166;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Montserrat', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.progress-container {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    position: absolute;
    top: 0;
    left: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 5%;
    transition: width 0.5s ease;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 700;
}

.day-counter {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.day-counter span {
    font-size: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    margin: 2rem 0;
    font-size: 1.8rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0.5rem auto;
    border-radius: 2px;
}

.motivation-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.motivation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.motivation-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.motivation-card p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.7);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.9);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 107, 107, 0.1);
    transition: var(--transition);
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
    background-color: rgba(255, 107, 107, 0.2);
}

#photoInput {
    display: none;
}

.photo-preview {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.photo-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.timeline-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    max-height: 1000px; /* 设置一个足够大的值 */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.timeline-container.collapsed {
    max-height: 0;
}

.toggle-btn {
    display: block;
    margin: 15px auto;
    padding: 8px 20px;
    background-color: #4ecdc4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-btn:hover {
    background-color: #3dbeb5;
}

.timeline {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #e0e0e0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-text {
    margin-bottom: 0.5rem;
}

.timeline-photo {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 1/1;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

.gallery-day {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-color);
    color: white;
    margin-top: 2rem;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .stats-container {
        flex-direction: column;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 21px;
    }

    .timeline-item.right {
        left: 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .motivation-card {
        padding: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}


/*弹框*/
/* 美化提示弹框 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #4CAF50;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(150%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #f44336;
}

.notification-icon {
    font-size: 20px;
}

.notification-close {
    margin-left: 15px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}
@keyframes slideIn {
    from { transform: translateX(150%); }
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.notification.show {
    animation: slideIn 0.3s forwards;
}

.notification.hide {
    animation: fadeOut 0.5s forwards;
}
